\name{qsub}
\alias{qsub}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
  Submit a grid engine job from R
}
\description{
 Provides a wrapper for submitting R jobs to grid engine.
}
\usage{
 qsub(command, tag, q.workDir = NULL, q.binary = "y", q.pe = NULL, q.q = "all.q", cmdArgs = NULL, ...)
}
%- maybe also 'usage' for other objects documented here.
\arguments{
  \item{command}{
    A binary or script file to be executed through grid engine.
}
  \item{tag}{
    A job name.
}
  \item{q.workDir}{
    Working directory (current working directory by default).  Output and logs will be placed here unless an
    alternative is specified.
}
  \item{q.binary}{
    Yes or no, is \code{command} a binary or a script?
}
  \item{q.pe}{
    Parallel environment, if applicable.
}
  \item{q.q}{
    Which queue to submit the job to.  \code{all.q} is the default.
}
  \item{cmdArgs}{
    A list of arguments for \code{command}
}
}
\details{
  The utility of this function, as it is simply a wrapper, lies in the
  ability to request jobs from R concisely and without system calls.
  Example usage cases (outside of \code{\link{qapply}}):
  
  1: calling an R script that serves as a template, in which case
  \code{command="R --no-save"} with \code{cmdArgs="--args <some
    args to be passed into R < myScript.R"} and \code{q.binary="y"}.  Here, the user
  has written an R script (myScript.R) that takes some arguments (see
  the base help for
  \code{\link{commandArgs}}) and will be executed from within
  grid engine.

  2: calling a (bash) script with grid directives, in which case
  \code{q.binary="n"} and command is simply the file (and path to file)
  of the grid engine control script.
}
\value{
  None
}
\references{
%% ~put references to the literature/web site here ~
}
\author{
Dan Polhamus
}
\note{
%%  ~~further notes~~
}

%% ~Make other sections like Warning with \section{Warning }{....} ~

\seealso{
 \code{\link{qapply}}, \code{\link{commandArgs}}
}
